
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO

/*
----------------------------------------------------------------------------------------------------

-- Created By:  ()
-- Purpose: Inserts a record into the Appointment table
-- Table Comment: Đặt lịch hẹn
----------------------------------------------------------------------------------------------------
*/


CREATE PROCEDURE dbo.Appointment_Insert
(

	@Id int   ,

	@LocalId nvarchar (20)  ,

	@FirstName nvarchar (50)  ,

	@LastName nvarchar (50)  ,

	@FromTime datetime   ,

	@EndTime datetime   ,

	@Description nvarchar (500)  ,

	@Doctor nvarchar (100)  ,

	@ParentId varchar (15)  ,

	@AppointmentType varchar (20)  ,

	@CreatedDate datetime   
)
AS


				
				INSERT INTO [dbo].[Appointment]
					(
					[Id]
					,[LocalId]
					,[FirstName]
					,[LastName]
					,[FromTime]
					,[EndTime]
					,[Description]
					,[Doctor]
					,[ParentId]
					,[AppointmentType]
					,[CreatedDate]
					)
				VALUES
					(
					@Id
					,@LocalId
					,@FirstName
					,@LastName
					,@FromTime
					,@EndTime
					,@Description
					,@Doctor
					,@ParentId
					,@AppointmentType
					,@CreatedDate
					)
				
									
							
			

GO
